<template>
  <el-menu :collapse="isCollapse" class="el-menu-vertical-demo">
    <!-- 递归组件 生产菜单 -->
    <submenu-list :menuList="menuList" />
  </el-menu>
  {{ isCollapse }}
</template>

<script>
import { defineComponent, computed } from "vue";
import { useHookStore } from "../../hooks";
import useComputedRouter from "./useComputedRouter";
import SubmenuList from "./List.vue";
export default defineComponent({
  name: "Globalaside",
  components: { SubmenuList },
  setup() {
    const { state, getters } = useHookStore();
    console.log({ state });
    const isCollapse = computed(() => state.settings.isCollapse);
    const { activeMenu, menuList, include } = useComputedRouter();
    console.log({ menuList });
    return {
      activeMenu,
      menuList,
      include,
      isCollapse,
    };
  },
});
</script>